package com.msf.modules.sys.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.msf.common.domain.dto.LoginModel;
import com.msf.common.domain.query.PageQuery;
import com.msf.common.domain.vo.Result;
import com.msf.modules.sys.domain.dto.RoleUserDto;
import com.msf.modules.sys.domain.dto.SysUserRoleDto;
import com.msf.modules.sys.domain.dto.UserDto;
import com.msf.modules.sys.domain.dto.UserEditDto;
import com.msf.modules.sys.entity.SysUser;

import java.util.List;

/**
 *
 * @author xujf
 * @since 2024-07-24
 */
public interface ISysUserService extends IService<SysUser> {

    Result<IPage<SysUser>> queryPageList(PageQuery pageQuery);

    Result<?> add(UserDto userDto);

    Result<?> edit(UserEditDto userDto);

    void deleteUser(String id);

    void deleteBatchUsers(String ids);

    LoginModel getUserByName(String username);

    Result<List<String>> queryUserRole(String userId);

    Result<?> queryRoleUser(RoleUserDto roleUserDto);

    Result<?> addSysUserRole(SysUserRoleDto sysUserRoleDto);

    Result<?> deleteRoleUser(SysUserRoleDto sysUserRoleDto);

    Result<?> restPassword(String userId);
    /**
     * 校验用户是否有效
     */
    Result<?> checkUserIsEffective(SysUser sysUser);

}
